<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
<!-- QCtmHeaderView.cpp -->
  <title>QCtmHeaderView Class | QCustomUi 1.10.0</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li><a href="index.html">QCustomUi 1.10.0</a></li>
<li><a href="index.html">QCustomUi</a></li>
<li>QCtmHeaderView</li>
<li id="buildversion">QCustomUi 1.10.0 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3 id="toc">Contents</h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#reimplemented-public-functions">Reimplemented Public Functions</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#reimplemented-protected-functions">Reimplemented Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QCtmHeaderView Class</h1>
<!-- $$$QCtmHeaderView-brief -->
<p>自定义表头，提供了 checkbox 勾选功能. <a href="#details">More...</a></p>
<!-- @@@QCtmHeaderView -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">  <span class="preprocessor">#include &lt;QCtmHeaderView.h&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="https://doc.qt.io/qt/qheaderview.html">QHeaderView</a></td></tr></table></div>
<ul>
<li><a href="qctmheaderview-members.html">List of all members, including inherited members</a></li>
</ul>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qctmheaderview.html#QCtmHeaderView">QCtmHeaderView</a></b>(Qt::Orientation <i>orientation</i>, QWidget *<i>parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qctmheaderview.html#dtor.QCtmHeaderView">~QCtmHeaderView</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qctmheaderview.html#setReadOnly">setReadOnly</a></b>(int <i>logicIndex</i>, bool <i>enable</i>)</td></tr>
</table></div>
<h2 id="reimplemented-public-functions">Reimplemented Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmheaderview.html#setModel">setModel</a></b>(QAbstractItemModel *<i>model</i>) override</td></tr>
</table></div>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QRect </td><td class="memItemRight bottomAlign"><b><a href="qctmheaderview.html#doCheckBoxRect">doCheckBoxRect</a></b>(int <i>logicalIndex</i>) const</td></tr>
</table></div>
<h2 id="reimplemented-protected-functions">Reimplemented Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmheaderview.html#mousePressEvent">mousePressEvent</a></b>(QMouseEvent *<i>e</i>) override</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qctmheaderview.html#paintSection">paintSection</a></b>(QPainter *<i>painter</i>, const QRect &amp;<i>rect</i>, int <i>logicalIndex</i>) const override</td></tr>
</table></div>
<!-- $$$QCtmHeaderView-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
</div>
<!-- @@@QCtmHeaderView -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QCtmHeaderView[overload1]$$$QCtmHeaderViewQt::OrientationQWidget* -->
<h3 class="fn" id="QCtmHeaderView">QCtmHeaderView::<span class="name">QCtmHeaderView</span>(<span class="type"><a href="https://doc.qt.io/qt/qt.html#Orientation-enum">Qt::Orientation</a></span> <i>orientation</i>, <span class="type"><a href="https://doc.qt.io/qt/qwidget.html#QWidget">QWidget</a></span> *<i>parent</i>)</h3>
<p>构造函数 <i>orientation</i>, <i>parent</i>.</p>
<!-- @@@QCtmHeaderView -->
<!-- $$$~QCtmHeaderView[overload1]$$$~QCtmHeaderView -->
<h3 class="fn" id="dtor.QCtmHeaderView"><code>[virtual] </code>QCtmHeaderView::<span class="name">~QCtmHeaderView</span>()</h3>
<p>析构函数.</p>
<!-- @@@~QCtmHeaderView -->
<!-- $$$doCheckBoxRect[overload1]$$$doCheckBoxRectint -->
<h3 class="fn" id="doCheckBoxRect"><code>[protected] </code><span class="type"><a href="https://doc.qt.io/qt/qrect.html">QRect</a></span> QCtmHeaderView::<span class="name">doCheckBoxRect</span>(<span class="type">int</span> <i>logicalIndex</i>) const</h3>
<p>计算 checkbox 的包围盒 <i>logicalIndex</i>.</p>
<!-- @@@doCheckBoxRect -->
<!-- $$$mousePressEvent[overload1]$$$mousePressEventQMouseEvent* -->
<h3 class="fn" id="mousePressEvent"><code>[override virtual protected] </code><span class="type">void</span> QCtmHeaderView::<span class="name">mousePressEvent</span>(<span class="type"><a href="https://doc.qt.io/qt/qmouseevent.html">QMouseEvent</a></span> *<i>e</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qheaderview.html#mousePressEvent">QHeaderView::mousePressEvent</a>(QMouseEvent *e).</p>
<!-- @@@mousePressEvent -->
<!-- $$$paintSection[overload1]$$$paintSectionQPainter*constQRect&int -->
<h3 class="fn" id="paintSection"><code>[override virtual protected] </code><span class="type">void</span> QCtmHeaderView::<span class="name">paintSection</span>(<span class="type"><a href="https://doc.qt.io/qt/qpainter.html">QPainter</a></span> *<i>painter</i>, const <span class="type"><a href="https://doc.qt.io/qt/qrect.html">QRect</a></span> &amp;<i>rect</i>, <span class="type">int</span> <i>logicalIndex</i>) const</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qheaderview.html#paintSection">QHeaderView::paintSection(QPainter *painter, const QRect &amp;rect, int logicalIndex) const</a>.</p>
<!-- @@@paintSection -->
<!-- $$$setModel[overload1]$$$setModelQAbstractItemModel* -->
<h3 class="fn" id="setModel"><code>[override virtual] </code><span class="type">void</span> QCtmHeaderView::<span class="name">setModel</span>(<span class="type"><a href="https://doc.qt.io/qt/qabstractitemmodel.html">QAbstractItemModel</a></span> *<i>model</i>)</h3>
<p>Reimplements: <a href="https://doc.qt.io/qt/qheaderview.html#setModel">QHeaderView::setModel</a>(QAbstractItemModel *model).</p>
<!-- @@@setModel -->
<!-- $$$setReadOnly[overload1]$$$setReadOnlyintbool -->
<h3 class="fn" id="setReadOnly"><span class="type">void</span> QCtmHeaderView::<span class="name">setReadOnly</span>(<span class="type">int</span> <i>logicIndex</i>, <span class="type">bool</span> <i>enable</i>)</h3>
<p>设置 <i>logicIndex</i> 行/列只读 <i>enable</i>.</p>
<!-- @@@setReadOnly -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> QCustomUi
   Documentation contributions included herein are the copyrights of
   their respective owners.<br/>    The documentation provided herein is licensed under the terms of the    <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation    License version 1.3</a> as published by the Free Software Foundation.<br/> </div>
</body>
</html>
